<template>
  <el-dialog append-to-body :close-on-click-modal="false" :title="title" :visible.sync="isCommonModalTemplate" :width="width" top="15vh">
    <slot></slot>
  </el-dialog>
</template>
<script>
import request from '@/router/axios';
export default {
  name: 'common-modal-template',
  props: {
    title: {
      type: String,
      default: ''
    },
    width: {
      type: String,
      default: '30%'
    }
  },
  watch: {
    option: {
      handler(val) {
        console.log(val);
      },
      deep: true
    }
  },
  data() {
    return {
      isCommonModalTemplate: false, //模态框是否显示
      loading: false,
      titleInfo: ''
    };
  },

  created() {},

  mounted() {},

  methods: {
    showModal() {
      this.isCommonModalTemplate = true;
    },
    hideModal() {
      this.isCommonModalTemplate = false;
    }
  }
};
</script>
<style lang="scss" scoped></style>
